# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gucharmap
pkgver=16.0.2
pkgrel=0
pkgdesc="GNOME Unicode Charmap"
url="https://wiki.gnome.org/Apps/Gucharmap"
arch="all"
license="GPL-3.0-or-later GFDL-1.3-only"
makedepends="
	desktop-file-utils
	glib-dev
	gobject-introspection-dev
	gtk+3.0-dev
	itstool
	meson
	pcre2-dev
	perl
	unicode-character-database>=${pkgver/.*/}.0.0
	unzip
	vala
	"
subpackages="$pkgname-dev $pkgname-lang"
source="https://gitlab.gnome.org/GNOME/gucharmap/-/archive/$pkgver/gucharmap-$pkgver.tar.gz"

build() {
	# Disable docs due to https://github.com/mesonbuild/meson/issues/5843
	abuild-meson \
		-Ducd_path=/usr/share/unicode \
		-Ddocs=false \
		output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
39f73147d9687555cf60ba5ccee17c8aeaddef21ae38ba40c378f7b74979b1174150ab5f9ae9c986cab604199a6ffd78bb3bf3d6543edaa98888489058ea8b6e  gucharmap-16.0.2.tar.gz
"
